#ifndef QDISPLAYFIELD_H
#define QDISPLAYFIELD_H

#include <QVBoxLayout>
#include <QHash>
#include <QObject>
#include "qexppart.h"
#include "qeditablefield.h"
#include "qobjectpool.h"

class QDisplayField : public QObject
{
	Q_OBJECT
public:
   QDisplayField(QVBoxLayout* layout,QObject* parent = 0);
   ~QDisplayField();
   
   void setPartToDisplay(QEXPPart* part);
   QStringList getPartItems() const;
   
public slots:
	void itemChanged(const QString& change);
signals:
	void partModified(const QStringList&);
private:
	
	void clearLayout();
	QVBoxLayout* m_layout;
	QHash<QString,QString> m_grid;
	QHash<QString,QEditableField*> m_fields;

	QObjectPool<QEditableField>* m_pool;
};

#endif